Applications


Problem 1
A security system has four inputs and three outputs as shown. The system controls an automatic door. There are three methods to open the door:
  1. Using Key A and Key B
  2. Providing a username and a password
  3. Providing a secret question and an answer
Each method can only be used when the other methods have failed to open the door. If the keys are used to open the door, the Access Module and the Validation Module must have a value of zero. Both keys accept a value from 0 to 10. The door will open when both keys have the same value with a tolerance of 2.

The Access Module verifies the combination of the username and the password, this module produces a signal from zero to seven. The Validation Module checks the combination of the question and the answer, this module produces a signal from -1 to 1. To open the door using a username and a password or the secret question, both keys must be zero. The door will open when the combination of the values of the Access Module and Validation Module falls in the green area as shown below.

The siren alarm turns on when the combination of the values of the Access Module and the Validation Module falls in the red area as shown below.

The system makes a phone call when the Validation Module produces a negative value.

The lock that opens the door requires a level from 0 to 10; a value bigger than five will open the door, otherwise the door will remain close.

The siren alarm accepts values in the range from zero to five; a value from four to five will make the siren to turn on and produce a loud sound.

The system that makes the phone calls accepts any signal from -5 to 0. If the ANN produces a value from -5.0 to -2.5, the phone call will be made.

The security system will not open the door, turn on the siren alarm, neither make the phone in all the remaining cases that are not shown in the figure below.Build an appropriate set for training the ANN of the security system. Use an appropriate number of training cases. Discuss on teams about how to create the training set.

Security system

Regions

Hint
The output of an ANN is completely determined by its input. Thus, similar inputs MUST produce similar outputs. Your training set MUST include many cases that open the door, turn the siren on, make the phone call or do nothing.

Problem 2
Create a New Project called SecureSystem to build a data set to train the security system of the previous problem. After, split the data set to create the training set and the validation set. Use 90 % of the cases for training, and 10 % of the cases for validation. Save your code as Split.lab

Problem 3
Design and train an ANN for the security system. Use one hidden layer. Save your code as Train.lab

Problem 4
Check the training (Save your code as CheckTraining.lab): (a) Compute the mean squared error for the ANN using the training set. (b) Plot the error for each training case. (c) Save the plot as a vector image (checkTraining.pdf and checkTraining.emf)

Problem 5
Perform the validation of the ANN (Save your code as Validation.lab): (a) Compute the mean squared error for the ANN using the validation set. (b) Plot the error for each validation case. (c) Save the plot as a vector image (validation.pdf and validation.emf)

Problem 6
Double click the network to perform a simulation in real time. Check that the network meets all the requirements of the problem by applying the training and the validation cases.

Problem 7
Create an independent application for Microsoft Windows using C++ to simulate the security system using Microsoft Visual Studio and Wintempla. Use your creativity and imagination to design the GUI. For instance each key may be represented by a slider, and the door lock may be a represented by two different pictures (an open door and a close door). If you want to use sounds, you may need to un-comment the MIDI and audio DAC/ADC option in the stdafx.h file as shown below see Wintempla > Signal Processing > Introduction . To include the images inside the program executable file, you may use the Resource View to add the images as Bitmaps using the Import Button as shown below (see Wintempla > Images > BMP . In the same way, you may include a wave file inside the program executable file, you may use the Resource View to add the sounds as Wave using the Import Button as shown below. You may use the context menu by making click in the Resource View to manage the items in this view. If you do not want to include a button in the application, you may add an event to each slider by clicking at the slider and marking the event in the event tab.

stdafx.h
...
//_________________________________________ MIDI, Audio Card DAC's and ADC's (or GDI Game for timers)
#define WIN_DAC_ADC_SUPPORT
//_________________________________________ Rich Edit Control
//#define WIN_RICHEDIT_SUPPORT
//_________________________________________ OpenGL
//#define WIN_OPENGL_SUPPORT
//_________________________________________ Sockets
//#define WIN_SOCKETS_SUPPORT
//_________________________________________ DirectX
//#define WIN_DIRECTX
...

ImportButton

ResourceView

SecuritySystemGui

SliderEvent

Problem 8
Generate a report in Microsoft Word. Write some conclusions in the report focusing on the problems that were faced during the simulation and how these problems were or could be solved.

© Copyright 2000-2021 Wintempla selo. All Rights Reserved. Jul 22 2021. Home